
-- For now this is just a dummy file to show the concrete realization
-- of what the template functions produce

-- This would be the result of
-- $(mkGroup Integer (Order 4) Additive)

data Z4 = Z4
data Z4M a = Z4M Integer

instance Group Z4 Z4M Integer where
    lift Z4 a = Z4M $ a `mod` 4
    suc (Z4M a) = lift Z4 (a + 1)
    order Z4 = Order 4
    u Z4 = lift Z4 0
    gen Z4 = generate 4 (u Z4) (suc)
    op (Z4M a) (Z4M b) = lift Z4 (a + b)

instance Show (Z4M a) where
    show (Z4M a) = show a

--data Cyclic a = Cyclic Int
--data CM a = CM Int

-- This is not going to work, in order to do this right we need to have
-- the type of the group dependent on the type parameter n
{-instance Integral n =>Group (Cyclic n) CM Int where
    lift (Cyclic n) a = CM $ a `mod` n
    succ (Cyclic n) (CM a) = lift (Cyclic n) (a + 1)
    order (Cyclic n) = Order n
    u (Cyclic n) = lift (Cyclic n) 0
    gen (Cyclic n) = generate n (u (Cyclic n)) (Main.succ (Cyclic n))
    op (Cyclic n) (CM a) (CM b) = lift (Cyclic n) (a + b)

instance Show (CM a) where
    show (CM a) = show a
-}